import {http} from '@/utils/http'
import type { FilterParams } from '@/types/log'

// 获取日志列表
export const getLogList = (params: any): Promise<any> => {
    return http.get('/api/operation/getList', { params });
}

// 删除日志
export const deleteLog = (id: number): Promise<any> => {
    return http.post('/api/operation/delete', {id:id});
};

// 导出日志
export const exportLog = (params: FilterParams): Promise<Blob> => {
    return http.export('/api/operation/export', { 
        params,
        responseType: 'blob' // 指定响应类型为blob
    });
}

// 获取操作模块选项
export const getActionOptions = (): Promise<any> => {
    return http.get('/api/operation/getActionOptions');
}